R contains quite a few useful built-in functions to work with data structures. Here are some of the key functions to know:
# seq(start,end,step size)
seq(0, 100, by = 3)
v <- c(1,4,6,7,2,13,2)
sort(v)
sort(v,decreasing = TRUE)
v2 <- c(1,2,3,4,5)
rev(v2)
str(v)
append(v,v2)
sort(append(v,v2))
v <- c(1,2,3)
is.vector(v)
is.list(v)
as.list(v)
as.matrix(v)
Great! That's if for the built-in data structure functions! These will com ein handy so try to remember them for the exercises!